import request from '@/utils/request'

// 查询普通用户信息列表
export function listCommonUsersInfo(query) {
  return request({
    url: '/keep/commonUsers/userinfo/' + id,
    method: 'get',
    params: query
  })
}

// 查询普通用户管理列表
export function listCommonUsers(query) {
  return request({
    url: '/keep/commonUsers/list',
    method: 'get',
    params: query
  })
}

// 查询普通用户管理详细
export function getCommonUsers(id) {
  return request({
    url: '/keep/commonUsers/' + id,
    method: 'get'
  })
}

// 新增普通用户管理
export function addCommonUsers(data) {
  return request({
    url: '/keep/commonUsers',
    method: 'post',
    data: data
  })
}

// 修改普通用户管理
export function updateCommonUsers(data) {
  return request({
    url: '/keep/commonUsers',
    method: 'put',
    data: data
  })
}

// 删除普通用户管理
export function delCommonUsers(id) {
  return request({
    url: '/keep/commonUsers/' + id,
    method: 'delete'
  })
}

//根据id查询用户详细信息
export function selectCommonUsers(id) {
  return request({
    url: '/keep/commonUsers/userinfo/' + id,
    method: 'get'
  })
}

//根据id查询用户会员详细信息
export function selectCommonUsersCard(id) {
  return request({
    url: '/keep/commonUsers/userCard/' + id,
    method: 'get'
  })
}

//根据id查询用户地址详细信息
export function selectCommonUsersAddress(id) {
  return request({
    url: '/keep/commonUsers/userAddress/' + id,
    method: 'get'
  })
}

//根据id查询用户订单详细信息
export function selectCommonUsersOrder(id) {
  return request({
    url: '/keep/commonUsers/userOrder/' + id,
    method: 'get'
  })
}
//查询订单详细信息
export function listOrderInfo(id) {
  return request({
    url: '/keep/order/detail/' + id,
    method: 'get',
  })
}
